<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8"></meta>
    <title>渠道品牌统计日报表</title>
	<style>
		table{
			text-align: center;
			border-collapse: collapse;
			border-color: #80807E;
		}
		.r_header{
			background-color: #305496;
			color: white;
			font-weight: bolder;
			font-size: 14px;
			font-family: 楷体;
		}
		.r_data{
			background-color: #D9E1F2;
		}
		.r_title{
			color: white;
			background-color: green;
			font-weight: bolder;
		}
	</style>
</head>
<body>

     <table border="1" cellpadding="1" cellspacing="0">
     	<thead>
			<tr>
				<th class="r_title" colspan="10" th:text="${report.date+report.type.title}"/>
			</tr>
     		<tr class="r_header">
     			<th>渠道名称</th>
     			<th>品牌名称</th>
                <th>查询量</th>
                <th>查询成功</th>
     			<th>查询成功率</th>
     			<th>查无记录</th>
     			<th>查询超时</th>
     			<th>查询失败</th>
     		</tr>
     	</thead>
     	<tbody class="r_data" th:each="dataMap:*{report.details}">
            <tr class="channelName" >
                <td th:text="${dataMap.key}" th:rowspan="${#lists.size(dataMap.value)}"/>
                <td th:text="${dataMap.value.get(0).brandName}"/>
                <td th:text="${dataMap.value.get(0).orderNum}"/>
                <td th:text="${dataMap.value.get(0).successNum}"/>
                <td th:text="${#numbers.formatDecimal(dataMap.value.get(0).successNum*100.0/dataMap.value.get(0).orderNum,1,2)}+'%'"/>
                <td th:text="${dataMap.value.get(0).noRecordNum}"/>
                <td th:text="${dataMap.value.get(0).overTimeNum}"/>
                <td th:text="${dataMap.value.get(0).failedNum}"/>
            </tr>
            <tr th:if="${#lists.size(dataMap.value)>1}" class="channelName" th:each="index:${#numbers.sequence(1,#lists.size(dataMap.value)-1)}">
                <td th:text="${dataMap.value.get(index).brandName}"/>
                <td th:text="${dataMap.value.get(index).orderNum}"/>
                <td th:text="${dataMap.value.get(index).successNum}"/>
                <td th:text="${#numbers.formatDecimal(dataMap.value.get(index).successNum*100.0/dataMap.value.get(index).orderNum,1,2)}+'%'"/>
                <td th:text="${dataMap.value.get(index).noRecordNum}"/>
                <td th:text="${dataMap.value.get(index).overTimeNum}"/>
                <td th:text="${dataMap.value.get(index).failedNum}"/>
            </tr>
     	</tbody>
     </table>
</body>
</html>